package pta;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author tmh
 * @date 2024/12/18 22:35
 * @description
 */
public class T7_26十进制转16进制 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num=scanner.nextInt();
        List<Character> list = new ArrayList<>();
        while (num>0){
            int temp=num%16;
            if (num<10){
                list.add((char)(temp+'0'));
            }else {
                list.add((char)(temp-10+'A'));
            }
            num=num/16;
        }
        for (int i=list.size()-1;i>=0;i--){
            System.out.print(list.get(i));
        }
    }
}
